<template>
  <el-form label-width="100px">
    <el-form-item label="公司名称">
      <el-input v-model="companyInfo.name" disabled class="swtwidth" />
    </el-form-item>
    <el-form-item label="公司地址">
      <el-input
        v-model="companyInfo.companyAddress"
        disabled
        class="swtwidth"
      />
    </el-form-item>
    <el-form-item label="邮箱">
      <el-input
        v-model="companyInfo.mailbox"
        disabled
        class="swtwidth"
      />
    </el-form-item>
    <el-form-item label="备注">
      <el-input
        v-model="companyInfo.remarks"
        disabled
        class="swtwidth"
        type="textarea"
        :rows="3"
      />
    </el-form-item>
  </el-form>
</template>

<script>
import { company } from '@/api/setting'
export default {
  data() {
    return {
      companyInfo: {}
    }
  },
  created() {
    this.getData()
  },
  methods: {
    async getData() {
      const res = await company(this.$store.state.user.userInfo.companyId)
      this.companyInfo = res.data
    }
  }
}
</script>

<style lang="scss" scoped>
.swtwidth {
  width: 500px;
}
</style>
